# 水仙花数提取
for a in range(1, 10):
    for b in range(0, 10):
        for c in range(0, 10):
            i = int(f"{a}{b}{c}")
            if i == a**3 + b**3 + c**3:
                print(i)

# 百位数三位提取
n = 245
a = n // 100
b = (n % 100) // 10
c = n % 10
print(a, b, c)

# 方法2
for i in range(100, 1000):
    a = i // 100
    b = (i % 100) // 10
    c = i % 10
    if i == a*a*a + b*b*b + c*c*c:
        print(i)


l = [5, 10, 5, 10, 10, 20, 20, 5, 10]
l.remove(5)
print(l)
